package 药品;

import org.apache.hadoop.io.WritableComparable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class JavaBean implements WritableComparable<JavaBean> {
    private String businessLicenseNumber;
    private String businessPerson;
    private String certStr;
    private String epsAddress;
    private String epsName;

    private String epsProductAddress;
    private String isimport;
    private String legalPerson;
    private String processid;
    private String productSn;

    private String qfManagerName;
    private String qualityPerson;
    private String rcManagerDepartName;
    private String rcManagerUser;
    private String xkDate;

    private String xkDateStr;
    private String xkName;
    private String xkType;

    public int compareTo(JavaBean o) {
        return o.businessLicenseNumber.compareTo(this.businessLicenseNumber);
    }

    public void write(DataOutput dataOutput) throws IOException {
        dataOutput.writeUTF(businessLicenseNumber);
        dataOutput.writeUTF(businessPerson);
        dataOutput.writeUTF(certStr);
        dataOutput.writeUTF(epsAddress);
        dataOutput.writeUTF(epsName);

        dataOutput.writeUTF(epsProductAddress);
        dataOutput.writeUTF(isimport);
        dataOutput.writeUTF(legalPerson);
        dataOutput.writeUTF(processid);
        dataOutput.writeUTF(productSn);

        dataOutput.writeUTF(qfManagerName);
        dataOutput.writeUTF(qualityPerson);
        dataOutput.writeUTF(rcManagerDepartName);
        dataOutput.writeUTF(rcManagerUser);
        dataOutput.writeUTF(xkDate);

        dataOutput.writeUTF(xkDateStr);
        dataOutput.writeUTF(xkName);
        dataOutput.writeUTF(xkType);
    }

    public void readFields(DataInput dataInput) throws IOException {
        businessLicenseNumber = dataInput.readUTF();
        businessPerson = dataInput.readUTF();
        certStr = dataInput.readUTF();
        epsAddress = dataInput.readUTF();
        epsName = dataInput.readUTF();

        epsProductAddress = dataInput.readUTF();
        isimport = dataInput.readUTF();
        legalPerson = dataInput.readUTF();
        processid = dataInput.readUTF();
        productSn = dataInput.readUTF();

        qfManagerName = dataInput.readUTF();
        qualityPerson = dataInput.readUTF();
        rcManagerDepartName = dataInput.readUTF();
        rcManagerUser = dataInput.readUTF();
        xkDate = dataInput.readUTF();

        xkDateStr = dataInput.readUTF();
        xkName = dataInput.readUTF();
        xkType = dataInput.readUTF();
    }

    public void set(String businessLicenseNumber, String businessPerson, String certStr, String epsAddress, String epsName, String epsProductAddress, String isimport, String legalPerson, String processid, String productSn, String qfManagerName, String qualityPerson, String rcManagerDepartName, String rcManagerUser, String xkDate, String xkDateStr, String xkName, String xkType) {
        this.businessLicenseNumber = businessLicenseNumber;
        this.businessPerson = businessPerson;
        this.certStr = certStr;
        this.epsAddress = epsAddress;
        this.epsName = epsName;
        this.epsProductAddress = epsProductAddress;
        this.isimport = isimport;
        this.legalPerson = legalPerson;
        this.processid = processid;
        this.productSn = productSn;
        this.qfManagerName = qfManagerName;
        this.qualityPerson = qualityPerson;
        this.rcManagerDepartName = rcManagerDepartName;
        this.rcManagerUser = rcManagerUser;
        this.xkDate = xkDate;
        this.xkDateStr = xkDateStr;
        this.xkName = xkName;
        this.xkType = xkType;
    }

    @Override
    public String toString() {
        return
                businessLicenseNumber + "\t" +
                        businessPerson + "\t" +
                        certStr + "\t" +
                        epsAddress + "\t" +
                        epsName + "\t" +
                        epsProductAddress + "\t" +
                        isimport + "\t" +
                        legalPerson + "\t" +
                        processid + "\t" +
                        productSn + "\t" +
                        qfManagerName + "\t" +
                        qualityPerson + "\t" +
                        rcManagerDepartName + "\t" +
                        rcManagerUser + "\t" +
                        xkDate + "\t" +
                        xkDateStr + "\t" +
                        xkName + "\t" +
                        xkType;
    }

    public String getBusinessLicenseNumber() {
        return businessLicenseNumber;
    }

    public void setBusinessLicenseNumber(String businessLicenseNumber) {
        this.businessLicenseNumber = businessLicenseNumber;
    }

    public String getBusinessPerson() {
        return businessPerson;
    }

    public void setBusinessPerson(String businessPerson) {
        this.businessPerson = businessPerson;
    }

    public String getCertStr() {
        return certStr;
    }

    public void setCertStr(String certStr) {
        this.certStr = certStr;
    }

    public String getEpsAddress() {
        return epsAddress;
    }

    public void setEpsAddress(String epsAddress) {
        this.epsAddress = epsAddress;
    }

    public String getEpsName() {
        return epsName;
    }

    public void setEpsName(String epsName) {
        this.epsName = epsName;
    }

    public String getEpsProductAddress() {
        return epsProductAddress;
    }

    public void setEpsProductAddress(String epsProductAddress) {
        this.epsProductAddress = epsProductAddress;
    }

    public String getIsimport() {
        return isimport;
    }

    public void setIsimport(String isimport) {
        this.isimport = isimport;
    }

    public String getLegalPerson() {
        return legalPerson;
    }

    public void setLegalPerson(String legalPerson) {
        this.legalPerson = legalPerson;
    }

    public String getProcessid() {
        return processid;
    }

    public void setProcessid(String processid) {
        this.processid = processid;
    }

    public String getProductSn() {
        return productSn;
    }

    public void setProductSn(String productSn) {
        this.productSn = productSn;
    }

    public String getQfManagerName() {
        return qfManagerName;
    }

    public void setQfManagerName(String qfManagerName) {
        this.qfManagerName = qfManagerName;
    }

    public String getQualityPerson() {
        return qualityPerson;
    }

    public void setQualityPerson(String qualityPerson) {
        this.qualityPerson = qualityPerson;
    }

    public String getRcManagerDepartName() {
        return rcManagerDepartName;
    }

    public void setRcManagerDepartName(String rcManagerDepartName) {
        this.rcManagerDepartName = rcManagerDepartName;
    }

    public String getRcManagerUser() {
        return rcManagerUser;
    }

    public void setRcManagerUser(String rcManagerUser) {
        this.rcManagerUser = rcManagerUser;
    }

    public String getXkDate() {
        return xkDate;
    }

    public void setXkDate(String xkDate) {
        this.xkDate = xkDate;
    }

    public String getXkDateStr() {
        return xkDateStr;
    }

    public void setXkDateStr(String xkDateStr) {
        this.xkDateStr = xkDateStr;
    }

    public String getXkName() {
        return xkName;
    }

    public void setXkName(String xkName) {
        this.xkName = xkName;
    }

    public String getXkType() {
        return xkType;
    }

    public void setXkType(String xkType) {
        this.xkType = xkType;
    }
}
